(function() {
  var express, router;

  express = require('express');

  router = express.Router();

  module.exports = router;

  router.all('/', function(req, res, next) {
    var end_date, start_date;
    start_date = req.body.start_date || req.query.start_date || moment().format('YYYY-MM-DD');
    end_date = req.body.end_date || req.query.end_date || moment().format('YYYY-MM-DD');
    return res.redirect("/trstat/trcodes?start_date=" + start_date + "&end_date=" + end_date);
  });

}).call(this);
